<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        require_once 'configBD.php';

        $codigo = $_POST["codigo"];
        $nome = $_POST["nome"];
        $disciplina = $_POST["disciplina"];

        echo "$codigo 
          $nome
          $disciplina";

        $query = "INSERT INTO turma(codigo, nome, disciplina)
                    VALUES ('$codigo', '$nome', '$disciplina');";

        mysql_query($query)
                or header("Location: cadastroTurma.php");

        mysql_close($conexao);

        //header("Location: mainportal_cadastro.php");
        ?>
    </body>
</html>
